package com.zijidelu.luframework.plugins.tomlock.core;

import com.zijidelu.luframework.plugins.tomlock.core.data.BaseTomLockData;
import com.zijidelu.luframework.plugins.tomlock.core.data.TomLockResult;

import java.util.function.Supplier;

/**
 * 锁执行器。
 *
 * @author ZIJIDELU
 * @datetime 2025/4/20 19:06
 */
public interface TomLockExecutor {
    <T> T calcLockRun(TomLockResult tomLockResult, Supplier<T> supplier);

     void calcLockRun(TomLockResult tomLockResult, Runnable runnable);

    <T> T calcLockRun(BaseTomLockData tomLockData, TomLockResult tomLockResult, Supplier<T> supplier);
}
